package com.qf.dao;

import com.qf.pojo.Role;
import org.apache.ibatis.annotations.Select;

import java.util.Set;

/**
 * @author zhouhao
 * @create 2021-12-25 15:57
 */
public interface RoleDao {

    //根据用户Id查询所对应的角色
    @Select("select * from t_role where id in (select role_id from t_user_role where user_id = #{userId})")
    Set<Role> findByUserId(Integer userId);
}
